﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:MiniMap="clr-namespace:DeepEarth.Toolkit.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/DeepEarth.Toolkit.Common;component/Resources/CommonStyles.xaml"></ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="MiniMap:MiniMap">
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="Background" Value="#FF2B2B2B"/>
        <Setter Property="Template">
            <Setter.Value>

                <ControlTemplate TargetType="MiniMap:MiniMap">
                    <Border BorderThickness="1,1,1,1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" x:Name="LayoutRoot" >
                        <VisualStateManager.CustomVisualStateManager>
                            <ei:ExtendedVisualStateManager/>
                        </VisualStateManager.CustomVisualStateManager>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="WindowStateGroup" ei:ExtendedVisualStateManager.UseFluidLayout="True">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.6">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <QuarticEase EasingMode="EaseInOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Expanded">
                                </VisualState>
                                <VisualState x:Name="Collapsed">
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MouseStateGroup" ei:ExtendedVisualStateManager.UseFluidLayout="True">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.6">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CubicEase EasingMode="EaseInOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="MouseEnter">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseLeave"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <StackPanel Margin="4" Orientation="Vertical">
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top" >
                                <ContentControl  Width="200" Height="140" Name="PART_map"></ContentControl>
                                <Rectangle StrokeThickness="6" Canvas.Left="0" Height="140" Width="200" Stroke="White" Opacity="0.7" />
                                <Ellipse Height="6" Width="6" Fill="Red" IsHitTestVisible="False"/>
                            </Grid>
                        </StackPanel>
                    </Border>
                </ControlTemplate>

            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

